# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-sphinxcontrib-devhelp
_pyname=sphinxcontrib-devhelp
pkgver=1.0.5
pkgrel=2
pkgdesc="Sphinx devhelp extension"
url="https://pypi.org/project/sphinxcontrib-devhelp"
arch="noarch"
license="BSD-2-Clause"
depends="python3"
makedepends="py3-gpep517 py3-flit-core py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-sphinx"
subpackages="$pkgname-pyc"
source="$_pyname-$pkgver.tar.gz::https://github.com/sphinx-doc/sphinxcontrib-devhelp/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
options="!check" # py3-sphinx is a circular dep

build() {
	gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
d8d6f5429389c100bf81f0030a34713f6d9b0285866b4e912f21e0b490f3a501360f54be2fae9ce82ba025568f9a2f761013a64397289f94bdc06607baeb5bd0  sphinxcontrib-devhelp-1.0.5.tar.gz
"
